<?php

/**
 * winbinder 패키지 
 * 
 * 
 * @package php.ui.winbinder
 */


/**
 * WBHTMLControl
 *
 * @package php.ui.winbinder
 */
class WBHTMLControl extends WBControl { 
	public function __construct($options = array()) { 
		$options['class'] = HTMLControl;

		parent::__construct($options);
	}

	// 객체 초기화 
	protected function initComponent() { 
		parent::initComponent();	

		if (isset($this->url))	{
			$this->setLocation($this->getOption('url'));
		} else { 
			$this->blank();
		}
	}

	/**
	 * HTMLControl 전용 함수 
	 * 
	 * 
	 * // 기본 명령 
	 * cmd:back		Go to previously visited page.
	 * cmd:forward	Go to a page previously viewed before issuing the back command.
	 * cmd:refresh	Redraw the current page.
	 * cmd:stop		Stop the current action, like loading a page.
	 * cmd:busy		Return TRUE if the browser is busy or FALSE if idle.
	 * cmd:blank	Clear the page.
	 */
	public function setLocation($location = "cmd:blank") { 
		return wb_set_location($this->getInstance(), $location);
	}

	/**
	 * Clear the page
	 * 
	 */
	public function blank() { 
		$this->setLocation("cmd:blank");
	}

	/**
	 * Go to previously visited page.
	 * 
	 */
	public function back() { 
		$this->setLocation("cmd:back");
	}

	/**
	 * Go to a page previously viewed before issuing the back command.
	 * 
	 */
	public function forward() { 
		$this->setLocation("cmd:forward");
	}

	/**
	 * Redraw the current page.
	 * 
	 */	
	public function refresh() { 
		$this->setLocation("cmd:refresh");
	}

	/**
	 * Stop the current action, like loading a page.
	 * 
	 */	
	public function stop() { 
		$this->setLocation("cmd:stop");
	}

	/**
	 * Return TRUE if the browser is busy or FALSE if idle.
	 * 
	 */
	public function busy() { 
		$this->setLocation("cmd:busy");
	}

}

?>
